'); echo(''); echo(''); $page=1; if($_REQUEST['page']) $page=$_REQUEST['page']; //count of printing elements $cnt=930; $count=0; $ffile = fopen ("file_names.txt","r"); if ($ffile) { while(!feof($ffile)) { if(($count>=$cnt*($page-1))&&($count<($cnt*$page))) { $file[] = fgets($ffile); } else { $last = fgets($ffile); } $count++; } fclose ($ffile); } //$file = file("file_names.txt"); //$count = count($file); //counting of pages $countpages = ceil($count/930); echo('
'); for($y=1; $y<=$countpages; $y++) { echo("$y "); } echo('
'); echo('
'); for($i=0; $i<930; $i++) { if($file[$i]) echo("$file[$i]
"); } echo('
'); echo('
'); for($y=1; $y<=$countpages; $y++) { echo("$y "); } echo('
'); ?>